Optimal. Leaf size=248 \[ \frac {4 (g \tan (e+f x))^{p+5}}{a^3 f g^5 (p+5)}-\frac {\sec ^3(e+f x) \cos ^2(e+f x)^{\frac {p+7}{2}} (g \tan (e+f x))^{p+4} \, _2F_1\left (\frac {p+4}{2},\frac {p+7}{2};\frac {p+6}{2};\sin ^2(e+f x)\right )}{a^3 f g^4 (p+4)}+\frac {5 (g \tan (e+f x))^{p+3}}{a^3 f g^3 (p+3)}-\frac {3 \sec ^5(e+f x) \cos ^2(e+f x)^{\frac {p+7}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac {p+2}{2},\frac {p+7}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{a^3 f g^2 (p+2)}+\frac {(g \tan (e+f x))^{p+1}}{a^3 f g (p+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.42, antiderivative size = 248, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2711, 2607, 270, 16, 2617, 14} \[ -\frac {3 \sec ^5(e+f x) \cos ^2(e+f x)^{\frac {p+7}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac {p+2}{2},\frac {p+7}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{a^3 f g^2 (p+2)}-\frac {\sec ^3(e+f x) \cos ^2(e+f x)^{\frac {p+7}{2}} (g \tan (e+f x))^{p+4} \, _2F_1\left (\frac {p+4}{2},\frac {p+7}{2};\frac {p+6}{2};\sin ^2(e+f x)\right )}{a^3 f g^4 (p+4)}+\frac {5 (g \tan (e+f x))^{p+3}}{a^3 f g^3 (p+3)}+\frac {4 (g \tan (e+f x))^{p+5}}{a^3 f g^5 (p+5)}+\frac {(g \tan (e+f x))^{p+1}}{a^3 f g (p+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 16
Rule 270
Rule 2607
Rule 2617
Rule 2711
Rubi steps
\begin {align*} \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx &=\frac {\int \left (a^3 \sec ^6(e+f x) (g \tan (e+f x))^p-3 a^3 \sec ^5(e+f x) \tan (e+f x) (g \tan (e+f x))^p+3 a^3 \sec ^4(e+f x) \tan ^2(e+f x) (g \tan (e+f x))^p-a^3 \sec ^3(e+f x) \tan ^3(e+f x) (g \tan (e+f x))^p\right ) \, dx}{a^6}\\ &=\frac {\int \sec ^6(e+f x) (g \tan (e+f x))^p \, dx}{a^3}-\frac {\int \sec ^3(e+f x) \tan ^3(e+f x) (g \tan (e+f x))^p \, dx}{a^3}-\frac {3 \int \sec ^5(e+f x) \tan (e+f x) (g \tan (e+f x))^p \, dx}{a^3}+\frac {3 \int \sec ^4(e+f x) \tan ^2(e+f x) (g \tan (e+f x))^p \, dx}{a^3}\\ &=\frac {\operatorname {Subst}\left (\int (g x)^p \left (1+x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{a^3 f}-\frac {\int \sec ^3(e+f x) (g \tan (e+f x))^{3+p} \, dx}{a^3 g^3}+\frac {3 \int \sec ^4(e+f x) (g \tan (e+f x))^{2+p} \, dx}{a^3 g^2}-\frac {3 \int \sec ^5(e+f x) (g \tan (e+f x))^{1+p} \, dx}{a^3 g}\\ &=-\frac {3 \cos ^2(e+f x)^{\frac {7+p}{2}} \, _2F_1\left (\frac {2+p}{2},\frac {7+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}-\frac {\cos ^2(e+f x)^{\frac {7+p}{2}} \, _2F_1\left (\frac {4+p}{2},\frac {7+p}{2};\frac {6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac {\operatorname {Subst}\left (\int \left ((g x)^p+\frac {2 (g x)^{2+p}}{g^2}+\frac {(g x)^{4+p}}{g^4}\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f}+\frac {3 \operatorname {Subst}\left (\int (g x)^{2+p} \left (1+x^2\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f g^2}\\ &=\frac {(g \tan (e+f x))^{1+p}}{a^3 f g (1+p)}-\frac {3 \cos ^2(e+f x)^{\frac {7+p}{2}} \, _2F_1\left (\frac {2+p}{2},\frac {7+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}+\frac {2 (g \tan (e+f x))^{3+p}}{a^3 f g^3 (3+p)}-\frac {\cos ^2(e+f x)^{\frac {7+p}{2}} \, _2F_1\left (\frac {4+p}{2},\frac {7+p}{2};\frac {6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac {(g \tan (e+f x))^{5+p}}{a^3 f g^5 (5+p)}+\frac {3 \operatorname {Subst}\left (\int \left ((g x)^{2+p}+\frac {(g x)^{4+p}}{g^2}\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f g^2}\\ &=\frac {(g \tan (e+f x))^{1+p}}{a^3 f g (1+p)}-\frac {3 \cos ^2(e+f x)^{\frac {7+p}{2}} \, _2F_1\left (\frac {2+p}{2},\frac {7+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}+\frac {5 (g \tan (e+f x))^{3+p}}{a^3 f g^3 (3+p)}-\frac {\cos ^2(e+f x)^{\frac {7+p}{2}} \, _2F_1\left (\frac {4+p}{2},\frac {7+p}{2};\frac {6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac {4 (g \tan (e+f x))^{5+p}}{a^3 f g^5 (5+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 27.82, size = 1276, normalized size = 5.15 \[ \text {result too large to display} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.45, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-\frac {\left (g \tan \left (f x + e\right )\right )^{p}}{3 \, a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3} + {\left (a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3}\right )} \sin \left (f x + e\right )}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (g \tan \left (f x +e \right )\right )^{p}}{\left (a +a \sin \left (f x +e \right )\right )^{3}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\left (g \tan {\left (e + f x \right )}\right )^{p}}{\sin ^{3}{\left (e + f x \right )} + 3 \sin ^{2}{\left (e + f x \right )} + 3 \sin {\left (e + f x \right )} + 1}\, dx}{a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________